package com.hbnu.server.ftf.handler;

import com.hbnu.enums.Status;
import com.hbnu.message.GetPath;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

import static com.hbnu.tools.PrintTool.println;

public class GetPathHandler extends SimpleChannelInboundHandler<GetPath> {
    @Override
    protected void channelRead0(ChannelHandlerContext channelHandlerContext, GetPath getPath) throws Exception {
        println(getPath.getIp()+"进行连接！");
        //getPath.setIp();
        getPath.setPath(Status.ftf_SavePath);
        channelHandlerContext.writeAndFlush(getPath);
    }
}

//E:/视频/result/FileSystem/pom.xml